package com.dmc.hrl.service.impl;

import com.dmc.hrl.dao.mapper.TbGoodsMapper;
import com.dmc.hrl.domain.pojo.TbGoods;
import com.dmc.hrl.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    private TbGoodsMapper tbGoodsMapper;

    @Override
    public List<TbGoods> findAll() {
        return tbGoodsMapper.selectByExample(null);
    }

    @Override
    public TbGoods queryGoods(Integer Id) {
        return tbGoodsMapper.selectByPrimaryKey(Id);
    }

    @Override
    public List<TbGoods> queryGoodsByName(String name) {
        return tbGoodsMapper.selectByName(name);
    }
}
